Shape information coder and decoder dividing shape information into lower-resolution subsets

ABSTRACT

A shape information coder divides the pixels in the shape information into subsets representing different subsamplings of the shape information. Each pixel in each subset is coded with reference to a context which may be derived from reference pixels in more than one of the subsets. The context preferably includes reference pixels located on all sides of the pixel being coded, which leads to efficient coding. The shape information coder may have two or more cascaded stages, each operating as above, with one subset of pixels passed from each stage to be coded in the next stage. The resulting coded shape information is useful in, for example, wavelet coding of pictures.

BACKGROUND OF THE INVENTION

[0001] The present invention relates to the coding of shape information,a process carried out in the coding and decoding of still and movingpictures.

[0002] When still or moving pictures are coded and decoded, a coding ordecoding operation must sometimes be restricted to the picture elementsin an irregular area. This occurs when hierarchical coding methods suchas wavelet methods are employed. It then becomes necessary to furnishinformation specifying the shape of the area. The shape information canbe represented in the form of a bi-level image, which must also be codedand decoded.

[0003] When a picture is coded hierarchically, it is convenient to codethe accompanying shape information hierarchically as well. A known wayto do this is to generate a series of bi-level images of decreasingresolution, and code the difference between each successive pair ofimages in the series by, for example, an entropy coding technique.

[0004] Typically, each bi-level image in the series has half thevertical and horizontal resolution of the preceding image. Thus eachpicture element or pixel in one image in the series derives from fourpixels in the preceding image. In FIG. 1, for example, pixel A isderived from higher-resolution pixels a, b, c, d by a majority-decisionrule. In some conventional coders, to improve the quality of the reducedimage, the set of higher-resolution pixels is expanded to include morethan four pixels.

[0005] A problem when shape information is coded in this way is that thewavelet transform and other hierarchical coding methods employ adecimating type of subsampling to reduce image resolution. To reduce theresolution by half, for example, they discard every second pixel in thehorizontal and vertical directions. This subsampling method differs fromthe majority-decision methods employed in conventional hierarchicalmethods of coding shape information, leading to inconsistencies betweenthe shape information and picture information. In wavelet coding, theresult may be that the wavelet transform is applied to the wrong pixels,leading to image defects when the coded picture is decoded.

[0006] A further problem is that in the decoding process, each pixel canbe decoded only with reference to pixels that have already been decoded.In conventional coding and decoding methods, the reference pixels aretherefore disposed on only two sides of the pixel being coded ordecoded. Use of this type of reference-pixel context does not lead tocompression ratios as high as could be achieved if a more completecontext were available. Some coders attempt to improve the context byincreasing the number of reference pixels, but the resulting increase inthe number of context states can actually lower the coding compressionratio.

SUMMARY OF THE INVENTION

[0007] It is accordingly an object of the present invention to obtainhierarchically coded and decoded shape information that is consistentwith hierarchically coded and decoded picture information.

[0008] Another object of the invention is to improve the compressionratio of coded shape information.

[0009] The invented shape information coder has resolution convertingmeans that processes input shape information by dividing the pixels inthe shape information into mutually exclusive subsets, each subsetrepresenting a different subsampling of the input shape information andhaving a lower resolution than the input shape information. The subsetsof pixels are stored in a memory means.

[0010] A context generating means selects reference pixels from thememory means and generates context information. Preferably, the contextinformation generated for a pixel in one of the subsets is obtained fromreference pixels selected from at least two of the subsets, includingreference pixels disposed on all sides of the pixel. The contextinformation may be simplified by assigning different combinations ofreference-pixel values to the same context-information value. A codingmeans codes the subsets of pixels according to the context information.

[0011] The memory means may include a separate memory for each subset ofpixels. The coding means and context generating means may include aseparate coder for each memory, and a separate context generator foreach coder, so that different subsets can be coded concurrently.

[0012] A hierarchical shape information coder according to the inventioncomprises a plurality of cascaded stages, each separately structured asdescribed above. As input shape information, each stage (except thefirst) receives one of the subsets of pixels generated in the precedingstage. Context information may be supplied from each stage to thepreceding stage, so that the subset of pixels received from thepreceding stage does not have to be stored in the preceding stage.

[0013] The invention also provides a shape information decoder and ahierarchical shape information decoder analogous to the above shapeinformation coder and hierarchical shape information coder, usingsimilar context generating means.

[0014] The context generating means may comprise a reference pixelgenerator, a reference pixel position and context simplification memory,and a context converter.

BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In the attached drawings:

[0016]FIG. 1 illustrates a conventional hierarchical coding method;

[0017]FIG. 2 is a block diagram of a shape information coderillustrating a first embodiment of the invention;

[0018]FIG. 3 illustrates resolution conversion in the first embodiment;

[0019]FIG. 4 illustrates context generation in the first embodiment;

[0020]FIG. 5 illustrates a variation of context generation in the firstembodiment;

[0021]FIG. 6 is a block diagram of a shape information coderillustrating a second embodiment of the invention;

[0022]FIG. 7 illustrates context generation in the second embodiment;

[0023]FIG. 8 is a block diagram of a shape information decoderillustrating a third embodiment of the invention;

[0024]FIG. 9 is a block diagram of a shape information decoderillustrating a fourth embodiment;

[0025]FIG. 10 is a block diagram of one stage in a shape informationcoder illustrating a fifth embodiment;

[0026]FIG. 11 is a block diagram of one stage in a shape informationdecoder illustrating a sixth embodiment;

[0027]FIG. 12 is a block diagram illustrating the internal structure ofa context generator according to the present invention; and

[0028]FIG. 13 is a block diagram illustrating the internal structure ofa conventional context generator.

DETAILED DESCRIPTION OF THE INVENTION

[0029] Embodiments of the invention will be described with reference tothe attached drawings, in which like parts are indicated by likereference characters.

[0030] Referring to FIG. 2, the first embodiment is a shape informationcoder that receives shape information comprising a set of bi-levelpixels S10 and outputs blocks of coded shape information S15. The codingprocess proceeds through three resolution-reduction stages, the firststage 1 generating subsets of comparatively high-resolution shapeinformation, the second stage 2 generating subsets of medium-resolutionshape information, and the third stage 3 generating subsets oflow-resolution shape information. Each stage comprises a contextgenerator (C), a plurality of resolution converters (H, V), and aplurality of memories (M). The subsets of shape information generated inthese three stages are coded by a pixel coder.

[0031] The comparatively high-resolution shape information generated inthe first stage has a resolution equal to half the resolution of theinput shape information S10, horizontally and vertically. Eachsuccessive stage reduces the resolution by a further factor of twohorizontally and vertically.

[0032] In the first stage 1, the input shape information S10 issubsampled by a horizontal resolution converter (H) 11 that outputs twodifferent subsets of pixels S11-1 and S11-2 to respective verticalresolution converters (V) 12-1 and 12-2. The first vertical resolutionconverter 12-1 outputs two further subsets of pixels S12-1 and S12-2,writing subset S12-1 in a first memory (M) 13-1, and subset S12-2 in asecond memory 13-2. The second vertical resolution converter 12-2outputs a further subset of pixels S12-3 to a third memory 13-3, and astill further subset S12-4 to a fourth memory 13-4. These memories 13-1,13-2, 13-3, 13-4 are read by a context generator (C) 14, the pixels readfrom memories 13-1, 13-2, 13-3, 13-4 being denoted S13-1, S13-2, S13-3,S13-4, respectively The pixel information S13-2, S13-3, S13-4 read fromthe second, third, and fourth memories is also supplied to the pixelcoder 15, together with context information S14 from the contextgenerator 14.

[0033] The second stage 2 is identical to the first stage 1, except thatthe input shape information is the first subset of pixel informationS13-1 read from the first memory 13-1 in the first stage. The secondstage 2 comprises resolution converters 21, 22-1, 22-2, memories 23-1,23-2, 23-3, 23-4, and a context generator 24. The pixel coder 15receives pixel information S23-2, S23-3, S23-4 from the second, third,and fourth memories 23-2, 23-3, 23-4, and context information S24 fromthe context generator 24.

[0034] The third stage 3 is identical to the first two stages, the inputshape information now being the subset of pixel information S23-1 readfrom the first memory 23-1 in the second stage 2. The third stage 3comprises resolution converters 31, 32-1, 32-2, memories 33-1, 33-2,33-3, 33-4, and a context generator 34. The pixel coder 15 receivespixel information S33-1, S33-2, S33-3, S33-4 from all four memories inthis stage, and context information S34 from the context generator 34.

[0035] The memories (M) comprise, for example, random access memory(RAM) circuits. The resolution converters (H, V) and context generators(C) comprise, for example, address counters that generate memoryaddresses and logic circuits that extract and sort pixel values. Thepixel coder 15 comprises, for example, arithmetic, logic, and memorycircuits specialized for an entropy coding process such as arithmeticcoding. The resolution converters, context generators, and pixel codermay also be implemented by programs running on a suitable processor,such as a microprocessor or digital signal processor.

[0036] Next, the operation of the first embodiment will be described.

[0037] The horizontal resolution converter 11 sorts the pixels in theinput shape information S10 according to their horizontal position.Subset S11-1 comprises pixels in even-numbered horizontal positions.Subset S11-2 comprises pixels in odd-numbered horizontal positions.

[0038] The first vertical resolution converter 12-1 subsamples subsetS11-1 by sorting the pixels according to their vertical position, takingsubset S12-1 from even vertical positions and subset S12-2 from oddvertical positions. Similarly, the second vertical resolution converter12-2 takes subset S12-3 from even vertical positions and subset S12-4from odd vertical positions in subset S11-2.

[0039] A similar subsampling of subset S13-1 is carried out in thesecond stage 2, and a similar subsampling of subset S23-1 is carried outin the third stage 3 FIG. 3 illustrates the subsampling operations byusing circles, squares, triangles, and diamonds to denote pixels at evenand odd horizontal and vertical positions. As illustrated in FIG. 3, theshape information received by each stage is divided into four mutuallyexclusive subsets of pixels.

[0040] When these subsampling operations have been completed, the pixelcoder 15 begins coding the first low-resolution subset of pixels S33-1,read from memory 33-1. The pixel coder 15 scans each row of pixels inthis subset S33-1 from left to right, taking the rows in order from topto bottom, and codes each pixel by an entropy coding method such asarithmetic coding, with reference to a context derived from fourneighboring reference pixels that have already been coded. Thesereference pixels are indicated by circled numerals from one to four incolumn I in FIG. 4, in which the dark dot indicates the pixel beingcoded. The four reference pixels are obtained by context generator 34.

[0041] The efficiency of entropy coding depends on the extent to whichthe value of each pixel can be predicted from its context. In general,the value of the pixel being coded in column I in FIG. 4 is correlatedsufficiently well with the values of the four reference pixels to enablea fairly high compression ratio to be achieved in the coding process.

[0042] Next, the pixel coder 15 codes the subset S33-2 of pixels readfrom the second memory 33-2 in the third stage 3. The pixels availablefor use as context information now include all of the pixels in memory33-1, as well as pixels from memory 33-2 that have already been coded.The context generator 34 selects the five reference pixels indicated incolumn II in FIG. 4. In the pixel information S23-1 input to the thirdstage 3, the first two reference pixels (1 and 2), taken from memory33-1, are the pixels immediately above and below the pixel being coded(the dark dot). The third reference pixel (3), taken from memory 33-2,is located two pixels to the left of the pixel being coded. The fourthand fifth reference pixels (4 and 5), taken from memory 33-1, arelocated two pixels to the right of the pixel being coded, in the rowsabove and below the row of the pixel being coded. The pixel coder 15performs entropy coding using this five-pixel context. A very highcompression ratio can be expected, because the context is derived fromreference pixels on all four sides of the pixel being coded.

[0043] Next, the pixel coder 15 codes the subset S33-3 of pixels readfrom the third memory 33-3 in the third stage 3, using entropy codingwith the five-pixel context indicated in column III in FIG. 4. The firsttwo reference pixels (1, 2), taken from memory 33-1, are directlyadjacent the pixel being coded, being disposed immediately to its leftand right in the information S23-1 input to the third stage 3The thirdreference pixel (3), from memory 33-3, is located two pixels above thepixel being coded. The fourth and fifth reference pixels (4, 5), frommemory 33-2, are diagonally adjacent the pixel being coded, to the lowerleft and lower right. A very high compression can again be expected.

[0044] Next, the pixel coder 15 codes the subset S33-4 of pixels readfrom the fourth memory 33-4 in the third stage 3, using entropy codingwith the four-pixel context indicated in column IV in FIG. 4. In theinput information S23-1, the first two reference pixels (1, 2), takenfrom memory 33-2, are located immediately to the left and right of thepixel being coded. The third and fourth reference pixels (3, 4) takenfrom memory 33-3 are located immediately above and below the pixel beingcoded. A very high compression ratio can again be expected, as thecontext includes all four immediately adjacent pixels.

[0045] The pixel coder 15 has now coded all pixels in the subset S23-1read from the first memory 23-1 in the second stage 2, obtaining fourblocks of coded low-resolution shape information. Next, the pixel coder15 codes the subsets of pixels S23-2, S23-3, and S23-4 stored in thesecond, third, and fourth memories in the second stage 2 in the mannerdescribed above, using entropy coding with the contexts illustrated incolumns II, III, and IV, respectively, in FIG. 4. The contextinformation is furnished by context generator 24. This completes thecoding of all pixels in the subset S13-1 read from the first memory 13-1in the first stage, and adds three blocks of coded medium-resolutionshape information to the coded output S15.

[0046] Finally, the pixel coder 15 codes the subsets of pixels S13-2,S13-3, and S13-4 stored in the second, third, and fourth memories in thefirst stage 1 in the same way, again using entropy coding with thecontexts illustrated in columns II, III, and IV in FIG. 4, the contextinformation being furnished by context generator 14. Adding three blocksof coded high-resolution shape information to the coded output S15, thisprocess completes the coding of all pixels in the original shapeinformation S10.

[0047] The first embodiment codes all of the original shape informationS10 in an efficient hierarchical manner, using the same type ofsubsampling as employed in hierarchical picture coding methods such aswavelet methods. If the shape information is employed together withwavelet picture coding, to determine the pixels to which the wavelettransform is applied, then the coded shape information can be furnishedto a wavelet decoder, enabling the decoder to obtain accurate shapeinformation at each hierarchical stage of the wavelet decoding process.In this case, the first embodiment can be practiced as part of a waveletpicture coder, sharing the same memory means and resolution conversionmeans, requiring only the addition of the context generators 14, 24, 34and pixel coder 15.

[0048] The first embodiment also provides a high compression ratio,because with the exception of the pixels in subset S33-1, the context ofeach pixel is derived from reference pixels disposed on all four sidesof the pixel, taken from at least two subsets.

[0049] As a variation of the first embodiment, the context generators14, 24, 34 can select contexts as shown in FIG. 5. Columns I and II,used in coding subsets S33-1, S33-2, S23-2, and S13-2, are identical tocolumns I and II in FIG. 4, with reference pixels read from the firstand second memories in each stage. The five-pixel context in column III,used in the coding of subsets S13-3, S23-3, S33-3, includes referencepixels from the first and third memories in each stage. The six-pixelcontext in column IV, used in the coding of pixels read from the fourthmemory in each stage, includes reference pixels from the first andfourth memories in each stage. The contexts in columns II, III, and IVagain surround the pixel being coded on all four sides. This variationenables the subsets of pixels stored in the second, third, and fourthmemories in each stage to be coded in any order, providing greaterflexibility in adapting the shape information coding process to suit,for example, a wavelet picture coding process.

[0050] As another variation, the number of hierarchical stages can beincreased or decreased. For example, there may be only one stage 1, inwhich case the first comparatively high-resolution subset S13-1 in FIG.2 is supplied to the pixel coder 15. The shape information in thissubset S13-1 can be used in one stage of a wavelet coding or decodingprocess. The input shape information S10, comprising subset S13-1combined with the other three subsets S13-2, S13-3, S13-4, is used in ahigher stage of the wavelet coding or decoding process. Thus the shapeinformation is still coded in a hierarchical manner.

[0051]FIG. 6 illustrates a second embodiment of the invention. In thesecond embodiment, the subset of pixels S12-1 output by the firstvertical resolution converter 12-1 in the first stage 1 is supplieddirectly to the horizontal resolution converter 21 in the second stage2, without being stored in the first stage 1. Similarly, the subset ofpixels S22-1 output by the first vertical resolution converter 22-1 inthe second stage 2 is supplied directly to the horizontal resolutionconverter 31 in the third stage 3, without being stored in the secondstage 2. Aside from these differences, the second embodiment has thesame structure as the first embodiment.

[0052] The subsets of low-resolution information S33-1, S33-2, S33-3,and S33-4 produced in the third stage 3 are coded as in the firstembodiment, using entropy coding with the contexts illustrated incolumns I to IV in FIG. 4.

[0053] The subsets of medium-resolution information S23-2, S23-3, andS23-4 generated in the second stage 2 are also coded as in the firstembodiment, except that since subset S22-1 has not been stored in thesecond stage 2, it cannot be read by context generator 24. Instead, thenecessary reference pixels are obtained by the context generator 34 inthe third stage 3, which reads them from memories 33-1, 33-2, 33-3,33-4.

[0054] The storage locations of these reference pixels vary in relationto the position of the pixel being coded, depending on whether the pixelbeing coded is disposed in an even or odd horizontal position and aneven or odd vertical position. FIG. 7 illustrates the various cases forthe coding of pixels in subset S23-2, using the same numbering ofreference pixels as in column II of FIG. 4. Column II-a illustrates thecontext of a pixel (dark dot) stored in even vertical and horizontalpositions in memory 23-2. Context generator 24 reads one reference pixel(3) from memory 23-2 in the second stage 2; context generator 34 readsone reference pixel from each of the four memories 33-1, 33-2, 33-3,33-4 in the third stage 3. Column II-b similarly illustrates the contextof a pixel disposed in an even vertical and odd horizontal position.Column II-c illustrates the context of a pixel disposed in an oddvertical and even horizontal position. Column II-d illustrates thecontext of a pixel disposed in odd vertical and horizontal positions. Ineach case, the resulting context is the same as the context in the firstembodiment, shown in column II in FIG. 4.

[0055] The high-resolution subsets of pixels S13-2, S13-3, and S13-4 arealso coded in this way, the necessary reference pixels being obtained byall three context generators 14, 24, 34.

[0056] The second embodiment produces the same coded shape informationas the first embodiment, but requires less memory. The same effects areobtained as in the first embodiment, and the same variations arepossible.

[0057] As a third embodiment of the invention, FIG. 8 illustrates ashape information decoder for decoding the coded shape informationgenerated by the first or second embodiment. The decoder comprises aplurality of memories (M), resolution deconverters (H′, V′), and contextgenerators (C) organized into three stages 101, 102, 103, and a pixeldecoder 115 that receives coded shape information S15.

[0058] The first or high-resolution stage 101 comprises a horizontalresolution deconverter (H′) 111, which receives subsets of pixels S111-1and S111-2 from a pair of vertical resolution deconverters (V′) 112-1and 112-2 and outputs decoded shape information S110. The first verticalresolution deconverter 112-1 reads a subset of pixels S112-1 from afirst memory 113-1, and another subset of pixels S112-2 from a secondmemory 113-2. The second vertical resolution deconverter 112-1 reads asubset of pixels S112-3 from a third memory 113-3, and another subset ofpixels S112-4 from a fourth memory 113-4. Resolution deconverters 111,112-1, and 112-2 perform operations reverse to the subsamplingoperations carried out by the resolution converters 11, 12-1, 12-2 inthe first embodiment. Context generator 114 supplies context informationS114 obtained from memories 113-1, 113-2, 113-3, 113-4 to the pixeldecoder 115, operating in the same way as context generator 14 in thefirst embodiment. When read by the context generator 114, the contentsof memories 113-1, 113-2, 113-3, 113-4 are denoted S113-1, S113-2,S113-3, and S113-4, respectively. The pixel decoder 115 writes decodedpixels S116 in the second, third, and fourth memories S113-2, S113-3,S113-4.

[0059] The second stage 102 is structured similarly, comprising ahorizontal resolution deconverter 121, a pair of vertical resolutiondeconverters 122-1 and 122-2, memories 123-1, 123-2, 123-3, 123-4, and acontext generator 124. The horizontal resolution deconverter 121 outputsa comparatively high-resolution subset of pixels S117 to the firstmemory 113-1 in the first stage 101. The pixel decoder 115 writesdecoded pixels S126 in the second, third, and fourth memories 123-2,123-3, 123-4 in the second stage 102.

[0060] The third stage 103 is also similar, comprising a horizontalresolution deconverter 131, a pair of vertical resolution deconverters132-1 and 132-2, memories 133-1, 133-2, 133-3, 133-4, and a contextgenerator 134. The horizontal resolution deconverter 131 outputs amedium-resolution subset of pixels S127 to the first memory 123-1 in thesecond stage 102. The pixel decoder 115 writes decoded pixels S136 inthe second, third, and fourth memories 133-2, 133-3, 133-4 in the thirdstage 103, and decoded pixels S137 in the first memory 133-1 in thisstage 103

[0061] Next, the operation of the third embodiment will be described.During this operation, the pixel values stored in each memory are thesame as the pixel values stored in the corresponding memory in the firstembodiment.

[0062] Upon receiving coded shape information S15, the pixel decoder 115performs an entropy decoding process such as an arithmetic decodingprocess on the first block of coded low-resolution shape information toobtain decoded shape information S137, which is stored in the firstmemory 133-1 in the third stage. For the decoding of each pixel, thecontext generator 134 supplies a context derived from reference pixelsS133-1 that have already been decoded and stored in memory 133-1. Next,the pixel decoder 115 decodes the second block of coded low-resolutionshape information to obtain the pixels to be stored in the second memory133-2. The context generator 134 supplies context information derivedfrom reference pixels S133-1 and S133-2 read from memories 133 1 and133-2. The third and fourth blocks of low-resolution shape informationare similarly decoded and stored in the third and fourth memories 133-3,133-4. The contexts used are the same as in the first embodiment,illustrated in FIG. 4. When decoding of the low-resolution shapeinformation is completed, the resolution deconverters 132-1, 132-2, 131reassemble the decoded pixels to obtain the medium-resolution subset ofpixels S127, which is stored in the first memory 133-1 in the secondstage 102.

[0063] The pixel decoder 115 now decodes three blocks of codedmedium-resolution shape information S15, while context generator 124supplies context information comprising reference pixels S123-1, S123-2,S123-3, S123-4 that have already been decoded. Resolution deconverters122-1, 122-2, 121 reassemble the four medium-resolution subsets ofdecoded pixels S123-1, S123-2, S123-3, S123-4 to obtain thecomparatively high-resolution subset of pixels S117, which is stored inmemory 113-1 in the first stage 101.

[0064] Finally, three blocks of coded high-resolution shape informationS15 are decoded and reassembled in the same way to obtain the decodedshape information S110.

[0065] The decoding process can proceed in parallel with a waveletpicture decoding process, the shape information obtained at eachintermediate stage being used to place pixels produced by waveletdecoding in their correct positions. Specifically, the low-resolutionshape information S137 decoded first is used in a first stage of thewavelet picture decoding process. The medium-resolution shapeinformation S127 is used in a second stage of the wavelet picturedecoding process. The comparatively high-resolution shape informationS117 is used in a third stage of the wavelet picture decoding process.The final output shape information S110, which has the highestresolution, is used in a final stage of the wavelet picture decodingprocess. The resolution deconverters employ the same type of reversesubsampling as employed in wavelet decoding, permitting the sharing ofresolution deconverting means between the wavelet decoder and shapeinformation decoder, and at each stage of the picture decoding process,the wavelet decoder can obtain precisely the shape information it needsfor correct picture decoding.

[0066] As a fourth embodiment, FIG. 9 illustrates a decoder similar tothe third embodiment, but lacking the first memories in the first andsecond stages 101, 102. The first vertical resolution deconverter 122-1in the second stage 102 receives shape information S122-1 directly fromthe horizontal resolution deconverter 131 in the third stage 103. Thefirst vertical resolution deconverter 112-1 in the first stage 101receives shape information S112-1 directly from the horizontalresolution deconverter 121 in the second stage 102.

[0067] The fourth embodiment operates in the same way as the thirdembodiment, except that the context generators 114, 124, 134 function asin the second embodiment. Thus when decoding medium-resolution shapeinformation S126, the pixel decoder 115 receives context informationS124 and S134 from the context generators 124, 134 in both the secondand third stages 102, 103. Similarly, when decoding high-resolutionshape information S116, the pixel decoder 115 receives contextinformation S114, S124, S134 from the context generators 114, 124, 134in all three stages. The resolution deconverters in all stages operateafter all pixels have been decoded and stored in the memories.

[0068] The fourth embodiment provides the same effects as the thirdembodiment, while using less memory.

[0069] Next, a fifth embodiment will be described. The fifth embodimentis a coder comprising cascaded stages with four memories in each stage,as in the first embodiment. In the fifth embodiment, a separate contextgenerator and pixel coder are provided for each memory, and the codingof the contents of all memories proceeds in parallel.

[0070]FIG. 10 shows the structure of a typical stage in the fifthembodiment. The input shape information S310 is the subset of pixelsread from the first memory in the preceding stage, except in the firststage, in which the input shape information comprises all of the pixelsinput to the shape information coder. The horizontal resolutionconverter 311 and vertical resolution converters 312-1 and 312-2 operateas described in the first embodiment, storing subsampled subsets ofpixels S312-1, S312-2, S312-3, S312-4 in memories 313-1, 313-2, 313-3,313-4. The first of these subsets, read as pixels S313-1 from the firstmemory 313-1, is supplied to the next stage, and to three contextgenerators 314-2, 314-3, 314-4. Pixels S313-2 read from the secondmemory 313-2 are supplied to context generator 314-2 and to a pixelcoder 315-2. Pixels S313-3 read from the third memory 313-3 are suppliedto context generator 314-3 and to another pixel coder 315-3. PixelsS313-4 read from the fourth memory 313-4 are supplied to contextgenerator 314-4 and to another pixel coder 315-4. The three pixel coders315-2, 315-3, 315-4 receive respective context information S314-2,S314-3, S314-4 from context generators 314-2, 314-3, 314-4. The contextsare as illustrated in columns II, III, and IV in FIG. 5.

[0071] In the lowest-resolution stage, an additional context generatorand pixel coder are provided for the first memory. The context shown incolumn I in FIG. 5 is used by this additional context generator andpixel coder.

[0072] In the fifth embodiment, as soon as the vertical resolutionconverters S312-1, S312-2 have finished storing subsets of pixels in thefour memories, and the contents of the first memory 313-1 have beentransferred to the next stage, the context generators 314-2, 314-3,314-4 and pixel coders 315-2, 315-3, 315-4 begin coding the contents ofthe second, third, and fourth memories 313-2, 313-3, 313-4, in parallel.The coding process is carried out as described in the first embodiment,using the contexts in FIG. 5 instead of the contexts in FIG. 4.

[0073] While this coding process proceeds, the pixels S313-1 transferredto the next stage are subsampled and stored in similar fashion, andcoding in the next stage begins. Thus coding can proceed concurrently indifferent stages, as well as proceeding concurrently on differentsubsets of pixels in the same stage.

[0074] The fifth embodiment generates the same type of hierarchicallycoded shape information as in the first and second embodiments, butoperates faster, because of the concurrent coding of the contents ofdifferent memories.

[0075] In a variation of the fifth embodiment, the same contextgenerators and pixel coder are used in different stages. In thisvariation, coding in one stage cannot begin until coding in the previousstage has ended, but the entire coding process can still be speeded upby a factor of approximately three, as compared with the firstembodiment.

[0076] As a sixth embodiment, FIG. 11 shows a typical stage in a decoderfor decoding the coded shape information generated in the fifthembodiment. The typical stage comprises a horizontal resolutiondeconverter 411, vertical resolution deconverters 412-1 and 412-2,memories 413-1, 413-2, 413-3, 413-4, context generators 414-2, 414-3,414-4, and pixel decoders 415-2, 415-3, 415-4.

[0077] Briefly, the sixth embodiment operates as follows. Pixels ofshape information S416-1 from the next lower-resolution stage are storedin the first memory 413-1 and supplied (as reference pixels S413-1) tothe context generators 414-2, 414-3, 414-4. The pixel decoders 415-2,415-3, 415-4 receive coded shape information S415-2, S415-3, S415-4 froman external source, and context information S414-2, S414-3, S414-4 fromthe context generators, and generate decoded pixels S416-2, S416-3,S416-4, which are stored in the second, third and fourth memories 413-2,413-3, 413-4. The contexts shown in FIG. 5 are used, so that the threepixel decoders 415-2, 415-3, 415-4 can operate concurrently. When thepixel decoders have finished decoding, the resolution deconverters412-1, 412-2, 411 reassemble the decoded data to generate shapeinformation of higher resolution, which is supplied to the nexthigher-resolution stage.

[0078] In the lowest-resolution stage, four context generators and fourpixel decoders are provided. All four pixel decoders in this stage canoperate concurrently if the second, third, and fourth pixel decoders lagone row behind the first pixel decoder.

[0079] The sixth embodiment provides the same effects as the thirdembodiment, but operates approximately three times as fast, because ofthe concurrent operation of the pixel decoders in each stage. A certaindegree of concurrency between different coding stages is also possible,if higher-resolution stages lag slightly behind lower-resolution stages.

[0080] As a seventh embodiment, FIG. 12 illustrates a context generatorthat can be applied in any of the preceding embodiments. This contextgenerator differs from conventional context generators by reducing thenumber of context states, to simplify the entropy coding process.

[0081] This context generator comprises a reference pixel generator 511that reads pixel information S510 from the appropriate memories shown inthe preceding embodiments, and generates discrete context informationS511 according to pixel position information S512 received from areference pixel position and context simplification memory 512. Acontext converter 513 converts the discrete context information S511 tosimplified context information S513 according to context conversioninformation S514 received from the reference pixel position and contextsimplification memory 512.

[0082] The operation of the seventh embodiment will be described below,taking the context shown in column II in FIG. 4 as an example. Thereference pixel position and context simplification memory 512 storesinformation specifying the positions of the five reference pixels inthis context, in relation to the pixel being coded or decoded. The pixelposition information S512 instructs the reference pixel generator 511 toobtain the corresponding pixel values. The discrete context informationS511 comprises a string of five bits giving the values of the referencepixels numbered one to five in column II in FIG. 4. This context hasthirty-two (2⁵) possible states, from ‘00000’ to ‘11111’.

[0083] The context conversion information S514 instructs the contextconverter 513 to reduce these thirty-two possible states to ten statesby, for example, the following rules. If the first two reference pixels(numbered 1 and 2 in FIG. 4) both have the value ‘1,’ the simplifiedcontext information S513 has state nine. If these first two referencepixels both have the value ‘0,’ the simplified context information S513has state eight. If the first two reference pixels have differentvalues, the simplified context information S513 has one of eight statesfrom zero to seven, depending on the eight possible combinations ofvalues of the third, fourth, and fifth reference pixels in the context.

[0084] As noted earlier, the first two reference pixels in this contextare directly adjacent the pixel being coded, above and below it. Ifthese two reference pixels have the same value, there is a highprobability that the pixel to be coded also has the same value,regardless of the values of the other reference pixels. The ten-statecontext output by the context converter 513 is therefore almost aseffective for entropy coding as the full thirty-two-state context.

[0085] Similar rules for simplifying the other contexts illustrated inFIG. 4, or FIG. 5, are stored in the reference pixel position andcontext simplification memory 512.

[0086] For comparison, FIG. 13 shows a conventional context generatorcomprising only a reference pixel generator 521 and a reference pixelposition memory 522. This context generator outputs the full context,e.g., the context with thirty-two states in the example above. Anentropy coder such as an arithmetic coder constructs a probabilitydistribution by assigning probabilities to the occurrence of each valueof the pixel to be coded for each context state. If the number ofcontext states is large, the probability calculations become complex,especially if the entropy coder modifies the probability distributionsadaptively during the coding process, as is often done. Furthermore, itis difficult to determine accurate probabilities for a large number ofstates, because each state occurs only infrequently. The resultinginaccurate probability assignments can lead to low compression ratios.

[0087] By discarding unimportant context information and therebyreducing the number of context states to which probabilities have to beassigned, the seventh embodiment simplifies and speeds up the entropycoding process. If the pixel coder modifies the probabilitydistributions adaptively, the seventh embodiment can also improve thecompression ratio, because each stage occurs more frequently, enablingmore accurate probabilities to be assigned.

[0088] Those skilled in the art will recognize that further variationsare possible within the scope claimed below.

What is claimed is:
 1. A shape information coder for coding shapeinformation represented by a set of pixels, comprising: resolutionconverting means dividing said set of pixels into a plurality ofmutually exclusive subsets, each subset among said plurality of subsetsrepresenting a different subsampling of said shape information andhaving lower resolution than said shape information; memory meanscoupled to said resolution converter, storing said subsets; contextgenerating means coupled to said memory means, selecting referencepixels from said memory means for each pixel in said subsets, andgenerating context information for each said pixel from the referencepixels selected therefor; and coding means coupled to said contextgenerating means, coding each said subset according to the contextinformation of the pixels in said subset.
 2. The shape information coderof claim 1, wherein for each pixel in one of said subsets, said contextgenerating means selects reference pixels from at least two of saidsubsets.
 3. The shape information coder of claim 2, wherein for eachsaid pixel in said one of said subsets, said context generating meansselects reference pixels that have already been coded and are disposedon all sides of said pixel.
 4. The shape information coder of claim 1,wherein said context generating means, in generating said contextinformation, assigns at least two different combinations of values ofsaid reference pixels to a single value of said context information. 5.The shape information coder of claim 1, wherein said resolutionconverting means generates, as said subsets, four subsets, each having aresolution reduced by a factor of two horizontally and vertically withrespect to said shape information.
 6. The shape information coder ofclaim 1, wherein said memory means comprises a plurality of memorieseach storing a different subset among said subsets.
 7. The shapeinformation coder of claim 6, wherein said coding means comprises aplurality of pixel coders concurrently coding the subsets stored inrespective memories, and said context generating means comprises aplurality of context generators supplying context information torespective pixel coders.
 8. A hierarchical shape information codercomprising a plurality of cascaded stages, from a highest-resolutionstage to a lowest-resolution stage, each stage among said stages beingseparately structured as described in claim 1, each stage except saidhighest-resolution stage having a next-higher-resolution stage amongsaid stages, the resolution converting means in each said stage exceptsaid highest-resolution stage receiving, as said shape information, onesubset among the subsets generated by the resolution converting means inthe next-higher-resolution stage.
 9. The hierarchical shape informationcoder of claim 8, wherein the context generating means in each saidstage except said highest-resolution stage supplies context informationto the coding means in the next-higher-resolution stage, and the shapeinformation received by the resolution converting means in each saidstage is not stored in the memory means in said next-higher-resolutionstage.
 10. A shape information decoder for decoding coded shapeinformation, comprising: decoding means decoding said coded shapeinformation according to context information, thereby generating aplurality of subsets of pixels; memory means coupled to said decodingmeans, storing said subsets of pixels; context generating means coupledto said memory means, selecting, for each pixel in said subsets,reference pixels already decoded by said decoding means, and generatingsaid context information from the selected reference pixels; andresolution deconverting means combining said subsets of pixels togenerate shape information having a higher resolution than in any one ofsaid subsets.
 11. The shape information decoder of claim 10, wherein foreach pixel in one of said subsets, said context generating means selectsreference pixels from at least two of said subsets.
 12. The shapeinformation decoder of claim 11, wherein for each said pixel in said oneof said subsets, said context generator selects reference pixelsdisposed on all sides of said pixel in said shape information.
 13. Theshape information decoder of claim 10, wherein said context generator,in generating said context information, assigns at least two differentcombinations of values of said reference pixels to a single value ofsaid context information
 14. The shape information decoder of claim 10,wherein said decoding means generates, as said subsets, four subsets,each having one half the resolution of said shape informationhorizontally and vertically.
 15. The shape information decoder of claim10, wherein said memory means comprises a plurality of memories eachstoring a different subset among said subsets.
 16. The shape informationdecoder of claim 15, wherein said decoding means comprises a pluralityof pixel decoders, each concurrently generating a different subset amongsaid subsets, and said context generating means comprises a plurality ofcontext generators supplying context information to respective pixeldecoders.
 17. A hierarchical shape information decoder comprising aplurality of cascaded stages, from a highest-resolution stage to alowest-resolution stage, each stage among said stages being separatelystructured as described in claim 10, each stage except saidhighest-resolution stage having a next-higher resolution stage amongsaid stages, the shape information generated by the resolutiondeconverter in each said stage except said highest-resolution stagebeing provided to the next-higher-resolution stage as one subset amongthe subsets in said next-higher-resolution stage.
 18. The hierarchicalshape information decoder of claim 17, wherein the context generatingmeans in each said stage except said highest-resolution stage providescontext information to the decoding means in the next-higher-resolutionstage, and the shape information received by said next-higher-resolutionstage is not stored in the memory means in said next-higher resolutionstage.
 19. A context generator generating context information for use inimage processing, comprising: a reference pixel position and contextsimplification memory storing first information specifying positions ofreference pixels, and second information specifying rules for convertingdiscrete context information to simplified context information; areference pixel generator coupled to said reference pixel position andcontext simplification memory, generating said discrete contextinformation by obtaining values of the reference pixels in the positionsspecified by said first information; and a context converter coupled tosaid reference pixel generator, converting said discrete contextinformation to said simplified context information according to saidsecond information, said simplified context information having fewerstates than said discrete context information.
 20. A shape informationcoder comprising the context generator of claim
 19. 21. A shapeinformation decoder comprising the context generator of claim 19.